import React from 'react';
import {Button, Text, View} from 'react-native';
import Config from 'react-native-config';
import {ToastManger} from '../components/Toast';
import {ScreenID} from '../variables';

const PageOne: React.ComponentType<any> = ({navigation}) => {
  return (
    <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
      <Text>{Config.API_URL}</Text>
      <Button
        title="alert"
        onPress={() => {
          ToastManger.displayAlert({
            type: 'success',
            message: 'hello',
          });
        }}
      />
      <Button
        title="欢迎"
        onPress={() => {
          navigation.push(ScreenID.TabPage);
        }}
      />
    </View>
  );
};

export default PageOne;
